<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>星球大战</title>
    <style>
    *{
        margin: 0;
        padding: 0;
    }
        body{
            background: url("./images/bg.jpg");
        }
    .starwars-demo{
        position: absolute;
        top:50%;
        left: 50%;
        width:17em;
        height: 34em;
        /* background-color: green; */
        transform:translate(-50%, -50%);
        perspective: 800px;
        transform-style: preserve-3d;
    }
    .star,.wars{
        position:absolute;
    }
    .star{
        top:10em;
        animation: star 10s ease-out infinite;
    }
    @keyframes star{
        0%{
            opacity: 0;
            transform:scale(1.5);
        }
        20%{
            opacity: 1;
        }
        89%{
            opacity: 1;
            transform: scale(1);
        }
        100%{
            opacity: 1;
            transform: translateZ(-400em);
        }
    }
    .wars{
        bottom: 10em;
        animation: star 10s ease-out infinite;
    }
    </style>
</head>
<body>
    <div class="starwars-demo">
        <img src="./images/star.svg" alt="" class="star">
        <img src="./images/wars.svg" alt="" class="wars">
    </div>
</body>
</html>